<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>코오롱</title>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/css/import.css" />
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/common.js"></script>
<c:set var="userAgent" value="${header['User-Agent']}" />
<fmt:setBundle basename="com.kolon.config.properties.config" var="config" />
<c:if test="${fn:indexOf(userAgent, 'Android') != -1}"><c:set var="platForm" value="Android" /></c:if>
<c:if test="${fn:indexOf(userAgent, 'iPhone') != -1}"><c:set var="platForm" value="iPhone" /></c:if>
<script type="text/javascript">
function appBack() {
	document.location.href='#';
}
</script>
<script type="text/javascript" src="${requestScope.contextPath}/js/cubiq-iscroll/iscroll.js"></script>
<script type="text/javascript">
var myScroll;
function loaded() {
	myScroll = new iScroll('wrapper', { 
		checkDOMChanges: true,
		zoom: false
	});
	<c:if test="${param.endY != null and param.endY != ''}">
		myScroll.scrollTo(0, ${param.endY}, 0);
		endY = ${param.endY};
	</c:if>
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
window.addEventListener('DOMContentLoaded', setTimeout(function () { loaded(); }, 200), false);
</script>
<style type="text/css" media="all">
#wrapper { position:absolute; z-index:1; top:144px; bottom:0px; left:0; width:320px; overflow:auto; }
#scroller { position:absolute;  -webkit-tap-highlight-color:rgba(0,0,0,0); width:100%; padding:0; background:#fff; }
</style>

</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>SERVICE DESK</h1>
			<ul class="tab2">
				<li><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskRequest.do"><img src="../../images/service/tab4_1.gif" alt="요청" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskRequestList.do"><img src="../../images/service/tab4_2.gif" alt="요청현황" /></a></li>
				
				<c:choose>
				<c:when test="${approval eq 'True' and assignee eq 'False'}">
	       		<!-- 승인자 -->
	       		<li><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskApplyList.do"><img src="../../images/service/tab4_3.gif" alt="승인대기" /></a></li>
	       		<!-- <li><a href="javascript:alert('승인대기 서비스는\n 추후 오픈예정 입니다.');"><img src="../../images/service/tab4_3.gif" alt="승인대기" /></a></li> -->
	       		</c:when>
				<c:when test="${approval eq 'False' and assignee eq 'True'}">
				<!-- 처리자 -->				
				<li><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do"><img src="../../images/service/tab4_4_over.gif" alt="처리현황" /></a></li>
				</c:when>
				<c:when test="${approval eq 'True' and assignee eq 'True'}">
				<!-- 승인자/처리자 -->
				<li><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskApplyList.do"><img src="../../images/service/tab4_3.gif" alt="승인대기" /></a></li>
				<!-- <li><a href="javascript:alert('승인대기 서비스는\n 추후 오픈예정 입니다.');"><img src="../../images/service/tab4_3.gif" alt="승인대기" /></a></li> -->
				<li><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do"><img src="../../images/service/tab4_4_over.gif" alt="처리현황" /></a></li>
				</c:when>
				</c:choose>
			</ul>
			<p class="service_btn"><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do?Status=ING"><img src="../../images/service/btn_ing2<c:if test="${Status eq 'ING'}">_on</c:if>.gif" alt="진행" /></a><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do?Status=CL"><img src="../../images/service/btn_end2<c:if test="${Status eq 'CL'}">_on</c:if>.gif" alt="종료" /></a><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do?Status=ALERT"><img src="../../images/service/btn_plan<c:if test="${Status eq 'ALERT'}">_on</c:if>.gif" alt="팀처리계획" /></a></p>
		</div><!-- // header -->
		<div id="wrapper" class="news">
		<div id="scroller">
				<ul>						
					<c:forEach items="${mapList}" var="mapInfo" varStatus="status">
					<li>
						<c:choose>
						<c:when test="${Status eq 'ALERT'}">
							<a href="javascript:goUrl('${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskNotification.do?Ref_Type=I&Ref_Num=${mapInfo.REF_NUM}&Status=${Status}&page=${page}&endY='+endY);"><span class="bold list1">${mapInfo.REQ_DESC}</span><span class="date1">[${mapInfo.REF_NUM}] ${mapInfo.USER_NM} ${mapInfo.OPEN_DATE}</span></a>
						</c:when>
						<c:otherwise>
							<a href="javascript:goUrl('${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessView.do?Ref_Num=${mapInfo.REF_NUM}&Status=${Status}&page=${page}&endY='+endY);"><span class="bold list1">${mapInfo.REQ_DESC}</span><span class="date1">[${mapInfo.REF_NUM}] ${mapInfo.USER_NM} ${mapInfo.OPEN_DATE}</span></a>
						</c:otherwise>
						</c:choose>
						<span class="status">
							<c:choose>
							<c:when test="${mapInfo.STATUS == '신규'}">
								신규
							</c:when>
	       					<c:when test="${mapInfo.STATUS == '접수'}">
								접수
							</c:when>
							<c:when test="${mapInfo.STATUS == '진행'}">
								진행
							</c:when>
							<c:when test="${mapInfo.STATUS == '종료'}">
								종료
							</c:when>
							<c:otherwise></c:otherwise>
							</c:choose>
						</span>
					</li>
					</c:forEach>
					
					<c:if test="${empty mapList}">
					<li>일치하는 자료가 없습니다.</li>
					</c:if>
				</ul>
				<c:if test="${totCnt > fn:length(mapList)}"> 
					<div class="btn_more11">
					<p class="more11"><a href="javascript:goUrl('${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do?Status=${Status}&page=${page+1}&endY='+endY);">15개 더보기</a></p>
					<p class="more22"><a href="javascript:myScroll.scrollTo(0, 0, 0);"><img src="${requestScope.contextPath}/images/news/btn_top.gif" alt="맨위로" />&nbsp;&nbsp;맨위로</a></p>
					</div>
				</c:if>
			</div>
			</div>
		</div><!-- // content -->
	</div><!-- // wrap -->
	<script>
		window.HybridApp.clearAllHistory(); 
	</script>
</body>
</html>


